package cn.edu.neu.softlab633.influencemaximization.sy.bean;

/**
 * Created by Jason on 2017/5/11.
 */
public class Potentiality implements Comparable<Potentiality> {

    private int id;
    private double pot;

    public Potentiality() {
    }

    public Potentiality(int id, double pot) {

        this.id = id;
        this.pot = pot;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setPot(double pot) {
        this.pot = pot;
    }

    public int getId() {

        return id;
    }

    public double getPot() {
        return pot;
    }

    @Override
    public int compareTo(Potentiality o) {
        if (this.getPot() < o.getPot()) {
            return 1;
        } else if (this.getPot() > o.getPot()) {
            return -1;
        }
        return 0;
    }
}
